package model

/*
node and nodeGroup structure:
[
    {
        "name": "group name",
        "description": "group description",
        "user_infos": [
            {
                "username": "root",
                "password": "root_password",
                "key_path": "ssh key file path"
            }
        ],
        "nodes": [
            {
                "name": "node name",
                "description": "node description",
                "ipv4": "111.111.111.111",
                "port": 22,
                "user_infos": [
                    {
                        "username": "root",
                        "password": "root_password",
                        "key_path": "ssh key file path"
                    }
                ]
            }
        ]
    }
]
*/

type NodeGroup struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	UserInfos   []UserInfo `json:"user_infos"`
	Nodes       []Node     `json:"nodes"`
}

type Node struct {
	Name        string     `json:"name"`
	Description string     `json:"description"`
	IPv4        string     `json:"ipv4"`
	Port        int        `json:"port"`
	UserInfos   []UserInfo `json:"user_infos"`
}

type UserInfo struct {
	UserName string `json:"username"`
	Password string `json:"password"`
	KeyPath  string `json:"key_path"`
}
